#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_pushButton_clicked()
{
    //获取文件属性
    QString path=QFileDialog::getOpenFileName(this);
    //构建QFileInfo对象
    QFileInfo info(path);
    //打印属性信息
    qDebug()<<info.fileName();
    qDebug()<<info.path();
    qDebug()<<info.size();


}
